﻿@using Framework.Authority
@{
    Layout = null;
}
<div data-options="region:'west',split:true" title="功能菜单" style="width: 200px;">
    <div class="easyui-accordion" data-options="fit:true,border:false,animate:false">
        @{
            var apps = ((List<View_SysAll>)ViewBag.List).GroupBy(i => new { i.AppID, i.AppName });
        }
        @foreach (var app in apps)
        {
            <div title="@app.Key.AppName">
                <div class="easyui-accordion" data-options="fit:true,border:false,animate:false">
                    @foreach (var module in app.GroupBy(i => i.ModuleName))
                    {
                        <div title="&nbsp;|— @module.Key" style="padding: 10px;">
                            @foreach (var fn in module.Distinct(i => i.FunctionID))
                            {
                                <ul><a href="#" onclick="addTab('@fn.FunctionName','@fn.FunctionUrl')">@fn.FunctionName</a></ul> 
                            }
                            <ul><a href="#" onclick="addTab('Module管理','/module')">Module管理</a></ul> 
                        </div>
                    }
                </div>
            </div>
        }
    </div>
</div>
